import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2024-09-13
 * Time: 21:22
 */
public class Main {
    public static people login() {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入你的名字：");
        String name = scanner.nextLine();
        System.out.println("请选择：");
        System.out.println("******1.管理者**");
        System.out.println("******2.使用者**");
        int choice = scanner.nextInt();
        if (choice == 1) {
            return new managers(name);
        } else {
            return new user(name);
        }
    }

    public static void main(String[] args) {
        bookList b=new bookList();
        while(true){

            people p= login();
            int a=p.menu();
            p.doOperation(b,a);

        }

    }
}